﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo1
{
    class Student:Person
    {
        public string major;
        public string grade;

        public string Major
        {
            get { return this.major; }
            set { this.major = value; }
        }
        public string Grade
        {
            get { return this.grade; }
            set { this.grade = value; }
        }

        public Student(int id, string name, char sex, string cardId, string tel, string major, string grade)
            : base(id, name, sex, cardId, tel)
        {
            this.major = major;
            this.grade = grade;
        }


        public void Test()
        {
            base.Test();
            Console.WriteLine("专业{0}、年级{1}", this.major, this.Grade);
        }
    }
}
